home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / AGSMC10.ZIP / CARLOST.PPE (.txt) < prev    next >
Encoding:
PCBoard Programming Language Executable  |  1995-02-27  |  2.8 KB  |  195 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 3.O1 (Encryption type I) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     String   STRING001
  20.     String   STRING002
  21.     Word     WORD001
  22.     Word     WORD002
  23.     Word     WORD003
  24.     Word     TWORD004(9)
  25.     Word     WORD005
  26.     Word     WORD006
  27.     Word     WORD007
  28.     Word     WORD008
  29.     Declare  Procedure PROC001()
  30.     Declare  Procedure PROC002(String STRING003, Word WORD009)
  31.     Declare  Procedure PROC003()
  32.     Declare  Procedure PROC004()
  33.  
  34. ;------------------------------------------------------------------------------
  35.  
  36.     STRING001 = PPEPath() + "WORK\ORG.DAT"
  37.     If (!Exist(STRING001)) End
  38.     WORD005 = FileInf(STRING001, 4) / 2
  39.     PROC001()
  40.     If (WORD001 == 0) End
  41.     If (!CDOn() && !OnLocal()) Then
  42.         STRING002 = PCBMac("@USER@") + " - CARRIER LOST !"
  43.         For WORD002 = 1 To WORD005
  44.             If (TWORD004(WORD002 - 1) && (WORD002 <> WORD001)) PROC002(STRING002, WORD002)
  45.         Next
  46.     Endif
  47.     PROC004()
  48.     End
  49.  
  50. ;------------------------------------------------------------------------------
  51.  
  52.     Procedure PROC001()
  53.  
  54.     WORD007 = 0
  55.     FOpen 1, STRING001, 0, 3
  56.     FSeek 1, 0, 0
  57.     For WORD003 = 1 To WORD005
  58.         FRead 1, WORD002, 2
  59.         If (WORD002 <> 0) Then
  60.             Inc WORD007
  61.             If (WORD002 == PcbNode()) WORD001 = WORD003
  62.             TWORD004(WORD003 - 1) = WORD002
  63.             Continue
  64.         Endif
  65.         TWORD004(WORD003 - 1) = 0
  66.     Next
  67.     FClose 1
  68.  
  69.     EndProc
  70.  
  71.  
  72. ;------------------------------------------------------------------------------
  73.  
  74.     Procedure PROC002(String STRING003, Word WORD009)
  75.  
  76.     WORD006 = WORD009
  77.     If (WORD006 == 10) WORD006 = 0
  78.     FCreate 1, PPEPath() + "WORK\PVT." + String(WORD006), 1, 0
  79.     FPutLn 1, STRING003
  80.     FClose 1
  81.  
  82.     EndProc
  83.  
  84.  
  85. ;------------------------------------------------------------------------------
  86.  
  87.     Procedure PROC003()
  88.  
  89.     For WORD003 = 1 To WORD005
  90.         If (TWORD004(WORD003 - 1) && (WORD003 <> WORD001)) Then
  91.             FCreate 1, PPEPath() + "WORK\READSEM." + String(WORD003), 1, 0
  92.             FPutLn 1, "OrgFile changed... Reread requested."
  93.             FClose 1
  94.         Endif
  95.     Next
  96.  
  97.     EndProc
  98.  
  99.  
  100. ;------------------------------------------------------------------------------
  101.  
  102.     Procedure PROC004()
  103.  
  104.     FOpen 1, STRING001, 2, 3
  105.     FSeek 1, (WORD001 - 1) * 2, 0
  106.     FWrite 1, 0, 2
  107.     FClose 1
  108.     WORD008 = WORD001
  109.     If (WORD008 == 10) WORD008 = 0
  110.     If (Exist(PPEPath() + "WORK\CHAT." + String(WORD008))) Delete PPEPath() + "WORK\CHAT." + String(WORD008)
  111.     If (Exist(PPEPath() + "WORK\ZAP." + String(WORD008))) Delete PPEPath() + "WORK\ZAP." + String(WORD008)
  112.     If (Exist(PPEPath() + "WORK\PVT." + String(WORD008))) Delete PPEPath() + "WORK\PVT." + String(WORD008)
  113.     If (Exist(PPEPath() + "WORK\READSEM." + String(WORD008))) Delete PPEPath() + "WORK\READSEM." + String(WORD008)
  114.     If (Exist(PPEPath() + "WORK\EJECT." + String(WORD008))) Delete PPEPath() + "WORK\EJECT." + String(WORD008)
  115.     If (Exist(PPEPath() + "WORK\SWAP." + String(PcbNode()))) Delete PPEPath() + "WORK\SWAP." + String(PcbNode())
  116.     PROC003()
  117.     PROC001()
  118.     If (WORD007 == 0) Then
  119.         Delete STRING001
  120.         For WORD008 = 0 To 9
  121.             If (Exist(PPEPath() + "WORK\CHAT." + String(WORD008))) Delete PPEPath() + "WORK\CHAT." + String(WORD008)
  122.             If (Exist(PPEPath() + "WORK\ZAP." + String(WORD008))) Delete PPEPath() + "WORK\ZAP." + String(WORD008)
  123.             If (Exist(PPEPath() + "WORK\PVT." + String(WORD008))) Delete PPEPath() + "WORK\PVT." + String(WORD008)
  124.             If (Exist(PPEPath() + "WORK\READSEM." + String(WORD008))) Delete PPEPath() + "WORK\READSEM." + String(WORD008)
  125.             If (Exist(PPEPath() + "WORK\EJECT." + String(WORD008))) Delete PPEPath() + "WORK\EJECT." + String(WORD008)
  126.             If (Exist(PPEPath() + "WORK\SWAP." + String(WORD008))) Delete PPEPath() + "WORK\SWAP." + String(WORD008)
  127.         Next
  128.         If (Exist(PPEPath() + "WORK\LOCKED.SEM")) Delete PPEPath() + "WORK\LOCKED.SEM"
  129.     Endif
  130.  
  131.     EndProc
  132.  
  133.  
  134. ;------------------------------------------------------------------------------
  135. ;
  136. ; Usage report (before postprocessing)
  137. ;
  138. ; ■ Statements used :
  139. ;
  140. ;    3       End
  141. ;    14      Goto 
  142. ;    19      Let 
  143. ;    27      If 
  144. ;    2       FCreate 
  145. ;    2       FOpen 
  146. ;    4       FClose 
  147. ;    2       FPutLn 
  148. ;    14      Delete 
  149. ;    1       Inc 
  150. ;    2       FSeek 
  151. ;    1       FRead 
  152. ;    1       FWrite 
  153. ;    4       EndProc
  154. ;
  155. ;
  156. ; ■ Functions used :
  157. ;
  158. ;    1       *
  159. ;    1       /
  160. ;    60      +
  161. ;    5       -
  162. ;    5       ==
  163. ;    3       <>
  164. ;    4       <
  165. ;    4       <=
  166. ;    8       >=
  167. ;    11      !
  168. ;    11      &&
  169. ;    4       ||
  170. ;    26      String()
  171. ;    29      PPEPath()
  172. ;    3       PcbNode()
  173. ;    1       OnLocal()
  174. ;    14      Exist()
  175. ;    1       CDOn()
  176. ;    1       FileInf()
  177. ;    1       PCBMac()
  178. ;
  179. ;------------------------------------------------------------------------------
  180. ;
  181. ; Analysis flags : No flag
  182. ;
  183. ;------------------------------------------------------------------------------
  184. ;
  185. ; Postprocessing report
  186. ;
  187. ;    4       For/Next
  188. ;    0       While/EndWhile
  189. ;    4       If/Then or If/Then/Else
  190. ;    0       Select Case
  191. ;
  192. ;------------------------------------------------------------------------------
  193. ;                 AEGiS Corp - Break the routines, code against the machines!
  194. ;------------------------------------------------------------------------------
  195.